import { http } from "@/uni-sub-base/service/request.js"
import configs from "@/config/config.js"
let serviceName = "Period/"
import { getBaseUrls } from "@/utils/appUrl.js"
//根据结束日期获取结算统计
export function GetSettlement(endTime) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetSettlement?endTime=" + endTime,
    })
}

//生成结算账期
export function GeneratePeriod(endTime) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GeneratePeriod?endTime=" + endTime,
    })
}

// 获取待结算记录分页
export function GetRecodePage(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetRecodePage",
        data,
    })
}

// 获取账期分页
export function GetPeriodPage(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetPeriodPage",
        data,
    })
}

//获取账期信息和操作流水
export function GetPeriod(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetPeriod" + path,
    })
}

//取消结算单
export function CanclePeriod(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "CanclePeriod" + path,
    })
}

//上传发票
export function InvoicingPeriod(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "InvoicingPeriod" + path,
    })
}

//确认收款
export function CheckPayPeriod(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "CheckPayPeriod" + path,
    })
}
